package com.enjoy.mvc;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;
import org.junit.Test;

import javax.servlet.ServletException;
import java.io.File;

public class MVCTest {


    @Test
    public void test() throws ServletException, LifecycleException {
        Tomcat tomcat = new Tomcat();
        tomcat.setPort(9000);
        tomcat.addWebapp("/mvc", new File("target/classes").getAbsolutePath());
        tomcat.start();
        tomcat.getServer().await();
    }

}
